<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box1{
            width: 200px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div id="box1"></div>

    <script>
        /* 
            event 事件

        */

        box1.onmousemove = function(event){
            console.log(event.clientX, event.clientY);
        }
    </script>
</body>
</html>